home *** CD-ROM | disk | FTP | other *** search
- Overview:
- ---------
- LANKEY.ZIP contains a group of functions designed to workaround the printing
- slowdown on non-dedicated network servers. Since Clipper is never really
- "idle," the operating system never gets much time to print a spooled print
- job. LANKEY forces Clipper to share time with a C function (in up to half-
- second time slices) when waiting for a keystroke. During the C function, the
- operating system gets enough time to print at full speed. There is no
- performance penalty, since both functions (Clipper and C) are interrupted by
- the next keystroke. There is no need to have a special version of the
- program for non-dedicated network servers, since there is no performance
- penalty for letting the time slicing occur even on single-user machines.
-
-
- Files contained in LANKEY.ZIP:
-
- LANKEYC.C : C code, C_INKEY() and C_PEEK() functions
- LANKEYC.OBJ : result of compiling LANKEYC.C
- LANKEY.PRG : Clipper code, P_INKEY() function
- LANKEY.DOC : this file
-
-
- Use of LANKEY:
- --------------
- The C functions are support functions for the Clipper function P_INKEY().
- You should use P_INKEY() wherever you have calls to INKEY() now. Note that
- P_INKEY() is a wait state, which means your SETKEYs will work. It is easy to
- take this feature out of it if you don't like it. You will also probably
- want to modify GETSYS.PRG to use P_INKEY() instead of INKEY(). If you leave
- the wait state feature in P_INKEY(), then in GETSYS.PRG, in the procedure
- GetReader(), find the line that says
-
- GetApplyKey( oGet, inkey( 0 ) )
-
- and change it to
-
- GetApplyKey(oGet,P_INKEY(0,.F.))
-
- This is so that P_INKEY() will not try to check for the SETKEYs, because
- GetApplyKey does that automatically.
-
- If you use ACHOICE() or MENU TO..., you may want to write your own menu
- function which handles waiting for a keystroke using P_INKEY(0).
-
- If you have any questions about the code, feel free to email them to me
- (Shawn B. Lipscomb, CIS ID 76247,772).
-
-
- Technical description:
- ----------------------
- C_INKEY() watches the keyboard buffer's tail to sense when a key has been
- hit. There are other ways to sense a keystroke, but a bug in DOS 3.3
- prevents functions like kbhit() from sensing enhanced-keyboard-only key
- combinations (like <CTRL><UP>) under certain circumstances. kbhit() is still
- necessary though, because that's where the network gets most of its time.
-
- These functions work with all versions of Clipper from 5.01 to 5.2a. As of
- 06/09/93, they have been revised to also work with ExoSpace. They should
- work on all non-dedicated servers, but have only been tested on Novell
- Netware and Lantastic. One user also reports success on CBIS's Network-OS
- version 7.26C.
-
-
- You may distribute LANKEY.ZIP freely, as long as the original files stay
- intact. You may, however, add your own files to the ZIP.
-
-
- Instructions:
- -------------
- To incorporate LANKEY into your application:
-
- 1. Compile LANKEY.PRG with the command:
-
- CLIPPER LANKEY /N
-
- 2. Change all your calls to INKEY() to call P_INKEY() instead. The
- syntax is exactly the same. You may want to use the following
- #xtranslate preprocessor command to automatically make this change at
- compile time:
-
- #xtranslate INKEY([<v1>]) => P_INKEY([<v1>])
-
- Do NOT include this preprocessor command when compiling LANKEY.PRG
- since P_INKEY() does actually call INKEY().
-
- 3. Recompile GETSYS.PRG after making the changes described earlier.
-
- 4. Link the following files into your application:
-
- LANKEY.OBJ
- LANKEYC.OBJ
- GETSYS.OBJ
- LLIBCA.LIB
-
- LLIBCA.LIB is Microsoft's large library and is available on Compuserve
- if you don't have Microsoft C.
-
- If you are using a link script, the additional lines would be
-
- FILE LANKEY, LANKEYC # Put these lines after your
- FILE GETSYS # other FILE commands. All three
- # can be overlaid.
-
- LIB LLIBCA # This should be the LAST line in
- # the link script (make sure it's
- # after CLIPPER.LIB).
-
- 5. Run your application and smile.